from fastapi import APIRouter
from app.api.schemas.trans_dtos import TextTransPayload, TextTransResponse
from app.api.services.translation_service import TranslationService, FileTransPayload


translate = APIRouter()


@translate.post("/text", summary="文本翻译", response_model=TextTransResponse)
async def translate_text(payload: TextTransPayload):
    result = await TranslationService().translate_text(payload)
    return result


@translate.get("/doc", summary="文档翻译")
async def translate_doc():
    return {"msg": "doc translate...."}


@translate.get("/image", summary="图片翻译")
async def translate_image():
    return {"msg": "image translate...."}


@translate.get("/voice", summary="语音翻译")
async def translate_voice():
    return {"msg": "voice translate...."}


@translate.get("/video", summary="视频翻译")
async def translate_video():
    return {"msg": "video translate...."}
